<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/10
 * Time: 16:45
 */

include "../config.php";
if(isset($_REQUEST["id"])){
    $uid = $_REQUEST["id"];
    $sql = "SELECT * FROM cart WHERE uid=?";
    $stmt = $conn->prepare($sql);
    $stmt->bind_param("i", $uid);
    $stmt->execute();
    $listArr = array();
    $result = $stmt->get_result();
    while($row = $result->fetch_assoc()){
        array_push($listArr, $row);
    }
    print_r(json_encode($listArr));
}


